// @Author EthanScriptOn
// @Desc
package node

import (
	"gitee.com/fatzeng/srf_switch_basic_components/proxy"
)

// CurrentReferenceHolderNode Holds a node that is currently referenced
type CurrentReferenceHolderNode struct {
	*DoublyLinkedNode
	currentReferenceProxy *proxy.Proxy
}

func GenerateCurrentReferenceHolderNode(currentReferenceProxy *proxy.Proxy) *CurrentReferenceHolderNode {
	currentReferenceHolderNode := &CurrentReferenceHolderNode{
		currentReferenceProxy: currentReferenceProxy,
	}
	doublyLinkedNode := GenerateEmptyDoublyLinkedNode(currentReferenceHolderNode)
	currentReferenceHolderNode.DoublyLinkedNode = doublyLinkedNode
	return currentReferenceHolderNode
}

func (c *CurrentReferenceHolderNode) GetCurrentReferenceProxy() *proxy.Proxy {
	return c.currentReferenceProxy
}
